package com.cqvip.innocence.project.model.dto;

import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.TableField;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * @author Administrator
 */
@Data
public class OperlogView {

    @TableField("admin_id")
    private Long adminId;

    @ApiModelProperty(value = "操作类型(0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据)")
    @TableField("type")
    private Integer type;

    @ApiModelProperty(value = "操作内容")
    @TableField("message")
    private String message;

    @ApiModelProperty(value = "操作结果是否成功(0-正常，1-异常)")
    @TableField("status")
    private Integer status;

    @ApiModelProperty(value = "请求方法")
    @TableField("method")
    private String method;

    @ApiModelProperty(value = "请求方式")
    @TableField("request_method")
    private String requestMethod;

    @ApiModelProperty(value = "请求ip")
    @TableField("ip")
    private String ip;

    @ApiModelProperty(value = "请求参数")
    @TableField("request_param")
    private String requestParam;

    @ApiModelProperty(value = "返回参数")
    @TableField("response_param")
    private String responseParam;


    @ApiModelProperty(value = "请求位置(0前台/1后台)")
    @TableField("position")
    private String position;

    @ApiModelProperty(value = "用户类型")
    @TableField("role_name")
    private String roleName;

    @ApiModelProperty(value = "用户名")
    @TableField("admin_name")
    private String adminName;

    @ApiModelProperty(value = "操作人")
    @TableField("real_name")
    private String realName;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startTime;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;

    @ApiModelProperty(value = "用户id")
    @TableField("cert_id")
    private String certId;
}
